|
Foxit PDF SDK
|
Public Member Functions | |
| def | TagTreeEditor (pdf_doc) |
| Constructor. More... | |
| def | AddNewTag (selected_tag_id, type, title) |
| Add a new tag to the tag tree. More... | |
| def | AddTagForAnnotation (is_tag_annotations, annot, page_index, selected_tag_id) |
| Add tag for annotation. More... | |
| def | ChangeTagToArtifact (selected_tag_ids, artifact_type, artifact_to_side) |
| Change tag to artifact. More... | |
| def | CreateTagFromSelectionByContent (selected_content_ids, selected_tag_id) |
| Create tag from selection by content. More... | |
| def | CreateTagFromSelectionByElement (page_index, selected_tag_id) |
| Create tag from selection by element. More... | |
| def | CreateTagFromSelectionByTag (selected_tag_ids, last_selected_tag_id) |
| Create tag from selection by tag. More... | |
| def | CreateTagFromSelectionByText (page_index, selected_text_rects, selected_tag_id) |
| Create tag from selection by text. More... | |
| def | DeleteEmptyTags (selected_tag_ids) |
| Delete empty tags from the tag tree. More... | |
| def | DeleteTags (selected_tag_ids) |
| Delete specified tags from the tag tree. More... | |
| def | FindTagFromSelection (selected_tag_ids) |
| Find tag from selection. More... | |
| def | GetAllContents (selected_tag_id) |
| Get all contents of a specified tag item. More... | |
| def | GetContentTreeItemIDsByTagItemID (selected_tag_id) |
| Get content tree item IDs by tag item ID. More... | |
| def | GetTagPropertyByID (item_id) |
| Get tag property by tag item ID. More... | |
| def | GetTagTree () |
| Get the tag tree of the current PDF document. More... | |
| def | GetTagTreeContextMenuItems (input_data) |
| Get context menu items for tag tree. More... | |
| def | IsEmpty () |
| Check whether current object is empty or not. More... | |
| def | MoveTags (source_tag_ids, dest_tag_id, is_moved_as_child) |
| Move tags in the tag tree. More... | |
| def | SetDocAsTaggedPDF () |
| Set the current PDF document as a tagged PDF. More... | |
| def | SetTagPropertyActualText (item_id, actual_text) |
| Set tag property actual text for a specified tag item. More... | |
| def | SetTagPropertyAlternateText (item_id, alternate_text) |
| Set tag property alternate text for a specified tag item. More... | |
| def | SetTagPropertyID (item_id, id) |
| Set tag property ID for a specified tag item. More... | |
| def | SetTagPropertyLanguage (item_id, language) |
| Set tag property language for a specified tag item. More... | |
| def | SetTagPropertyTitle (item_id, title) |
| Set tag property title for a specified tag item. More... | |
| def | SetTagPropertyType (item_id, type) |
| Set tag property type for a specified tag item. More... | |
Static Public Attributes | |
| e_ArtifactAttachToSideTypeBottom = _fsdk.TagTreeEditor_e_ArtifactAttachToSideTypeBottom | |
| Artifact attach side: bottom. | |
| e_ArtifactAttachToSideTypeLeft = _fsdk.TagTreeEditor_e_ArtifactAttachToSideTypeLeft | |
| Artifact attach side: left. | |
| e_ArtifactAttachToSideTypeNone = _fsdk.TagTreeEditor_e_ArtifactAttachToSideTypeNone | |
| Artifact attach side: none. | |
| e_ArtifactAttachToSideTypeRight = _fsdk.TagTreeEditor_e_ArtifactAttachToSideTypeRight | |
| Artifact attach side: right. | |
| e_ArtifactAttachToSideTypeTop = _fsdk.TagTreeEditor_e_ArtifactAttachToSideTypeTop | |
| Artifact attach side: top. | |
| e_ArtifactTypeLayout = _fsdk.TagTreeEditor_e_ArtifactTypeLayout | |
| Artifact type: layout artifact (visual layout elements). | |
| e_ArtifactTypePage = _fsdk.TagTreeEditor_e_ArtifactTypePage | |
| Artifact type: page-level artifact. | |
| e_ArtifactTypePagination = _fsdk.TagTreeEditor_e_ArtifactTypePagination | |
| Artifact type: pagination-related artifact (e.g., headers/footers). | |
This class lets user edit the tag tree (structure tree) of a PDF document: query and modify tag properties, add / delete / move tags, create tags from selection, change tags to artifacts and mark the document as a tagged PDF. Before using any class or methods in this module, please ensure Foxit PDF SDK has been initialized successfully by function FoxitPDFSDKPython2.Library.Initialize with a key including "Accessibility" module.
| def FoxitPDFSDKPython2.TagTreeEditor.TagTreeEditor | ( | pdf_doc | ) |
Constructor.
Constructor, with another tag editor object.
| [in] | pdf_doc | A valid PDF document object. |
| [in] | other | Another tag editor object. |
| def FoxitPDFSDKPython2.TagTreeEditor.AddNewTag | ( | selected_tag_id, | |
| type, | |||
| title | |||
| ) |
Add a new tag to the tag tree.
| [in] | selected_tag_id | The selected tag ID as parent. |
| [in] | type | The tag type. |
| [in] | title | The tag title. |
| def FoxitPDFSDKPython2.TagTreeEditor.AddTagForAnnotation | ( | is_tag_annotations, | |
| annot, | |||
| page_index, | |||
| selected_tag_id | |||
| ) |
Add tag for annotation.
| [in] | is_tag_annotations | Whether to tag annotations. |
| [in] | annot | The annotation object. |
| [in] | page_index | The page index. Valid range: from 0 to (count-1), where count is returned by function FoxitPDFSDKPython2.PDFDoc.GetPageCount . |
| [in] | selected_tag_id | The selected tag ID. |
| def FoxitPDFSDKPython2.TagTreeEditor.ChangeTagToArtifact | ( | selected_tag_ids, | |
| artifact_type, | |||
| artifact_to_side | |||
| ) |
Change tag to artifact.
| [in] | selected_tag_ids | The selected tag IDs. |
| [in] | artifact_type | The artifact type. Please refer to . |
| [in] | artifact_to_side | The artifact attach to side type. Please refer to . |
| def FoxitPDFSDKPython2.TagTreeEditor.CreateTagFromSelectionByContent | ( | selected_content_ids, | |
| selected_tag_id | |||
| ) |
Create tag from selection by content.
| [in] | selected_content_ids | The selected content IDs. |
| [in] | selected_tag_id | The selected tag ID. |
| def FoxitPDFSDKPython2.TagTreeEditor.CreateTagFromSelectionByElement | ( | page_index, | |
| selected_tag_id | |||
| ) |
Create tag from selection by element.
| [in] | page_index | The page index. Valid range: from 0 to (count-1), where count is returned by function FoxitPDFSDKPython2.PDFDoc.GetPageCount . |
| [in] | selected_tag_id | The selected tag ID. |
| def FoxitPDFSDKPython2.TagTreeEditor.CreateTagFromSelectionByTag | ( | selected_tag_ids, | |
| last_selected_tag_id | |||
| ) |
Create tag from selection by tag.
| [in] | selected_tag_ids | The selected tag IDs. |
| [in] | last_selected_tag_id | The last selected tag ID. |
| def FoxitPDFSDKPython2.TagTreeEditor.CreateTagFromSelectionByText | ( | page_index, | |
| selected_text_rects, | |||
| selected_tag_id | |||
| ) |
Create tag from selection by text.
| [in] | page_index | The page index. Valid range: from 0 to (count-1), where count is returned by function FoxitPDFSDKPython2.PDFDoc.GetPageCount . |
| [in] | selected_text_rects | The selected text rectangles. |
| [in] | selected_tag_id | The selected tag ID. |
| def FoxitPDFSDKPython2.TagTreeEditor.DeleteEmptyTags | ( | selected_tag_ids | ) |
Delete empty tags from the tag tree.
| [in] | selected_tag_ids | The array of tag IDs to check for empty tags. |
| def FoxitPDFSDKPython2.TagTreeEditor.DeleteTags | ( | selected_tag_ids | ) |
Delete specified tags from the tag tree.
| [in] | selected_tag_ids | The array of tag IDs to delete. |
| def FoxitPDFSDKPython2.TagTreeEditor.FindTagFromSelection | ( | selected_tag_ids | ) |
Find tag from selection.
| [in] | selected_tag_ids | The selected tag IDs. |
| def FoxitPDFSDKPython2.TagTreeEditor.GetAllContents | ( | selected_tag_id | ) |
Get all contents of a specified tag item.
| [in] | selected_tag_id | The selected tag ID. |
| def FoxitPDFSDKPython2.TagTreeEditor.GetContentTreeItemIDsByTagItemID | ( | selected_tag_id | ) |
Get content tree item IDs by tag item ID.
| [in] | selected_tag_id | The selected tag ID. |
| def FoxitPDFSDKPython2.TagTreeEditor.GetTagPropertyByID | ( | item_id | ) |
Get tag property by tag item ID.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by FoxitPDFSDKPython2.TagTreeEditor.GetTagTree . |
| def FoxitPDFSDKPython2.TagTreeEditor.GetTagTree | ( | ) |
Get the tag tree of the current PDF document.
| def FoxitPDFSDKPython2.TagTreeEditor.GetTagTreeContextMenuItems | ( | input_data | ) |
Get context menu items for tag tree.
| [in] | input_data | The input data for context menu. |
| def FoxitPDFSDKPython2.TagTreeEditor.IsEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
| def FoxitPDFSDKPython2.TagTreeEditor.MoveTags | ( | source_tag_ids, | |
| dest_tag_id, | |||
| is_moved_as_child | |||
| ) |
Move tags in the tag tree.
| [in] | source_tag_ids | The source tag IDs to move. |
| [in] | dest_tag_id | The destination tag ID. |
| [in] | is_moved_as_child | Whether to move as child of destination. |
| def FoxitPDFSDKPython2.TagTreeEditor.SetDocAsTaggedPDF | ( | ) |
Set the current PDF document as a tagged PDF.
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyActualText | ( | item_id, | |
| actual_text | |||
| ) |
Set tag property actual text for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by FoxitPDFSDKPython2.TagTreeEditor.GetTagTree . |
| [in] | actual_text | The actual text to set. |
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyAlternateText | ( | item_id, | |
| alternate_text | |||
| ) |
Set tag property alternate text for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by FoxitPDFSDKPython2.TagTreeEditor.GetTagTree . |
| [in] | alternate_text | The alternate text to set. |
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyID | ( | item_id, | |
| id | |||
| ) |
Set tag property ID for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by FoxitPDFSDKPython2.TagTreeEditor.GetTagTree . |
| [in] | id | The ID to set. |
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyLanguage | ( | item_id, | |
| language | |||
| ) |
Set tag property language for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by FoxitPDFSDKPython2.TagTreeEditor.GetTagTree . |
| [in] | language | The language to set. |
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyTitle | ( | item_id, | |
| title | |||
| ) |
Set tag property title for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by FoxitPDFSDKPython2.TagTreeEditor.GetTagTree . |
| [in] | title | The tag title to set. |
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyType | ( | item_id, | |
| type | |||
| ) |
Set tag property type for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by FoxitPDFSDKPython2.TagTreeEditor.GetTagTree . |
| [in] | type | The tag type to set. |